<?php

namespace App\Http\Controllers\Admin\SystemManage;

use App\Response\AdminRep;
use App\Response\TableRep;
use App\Services\AdminService\Models\AdminRecordModel;
use App\Services\AdminService\Services\RecordService;
use App\Services\AdminService\Services\UserService;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;


class RecordController extends Controller
{
    use AdminRep,TableRep;
    /**
     * 获取所有用户
     * Display a listing of the resource.
     * @return \Illuminate\Http\Response
     */
    public function index(Request $request)
    {
        $user = UserService::getAll();
        return view('admin.system_manage.record.index',compact('user'));
    }


    /**
     * 获取日志数据
     * @param Request $request
     * @return \Illuminate\Http\JsonResponse
     */
    public function data(Request $request){
        $res = RecordService::getData(new AdminRecordModel,$request->all());
        return $this->table($res);
    }


}
